package org.chenbingkang.boot.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ApplicationConfig {

    @Bean
    public OSS oss(@Value("${oss.endpoint}") String endpoint, @Value("${oss.access-key-id}") String accessKeyId, @Value("${oss.access-key-secret}") String secretAccessKey) {
        return new OSSClient(endpoint, accessKeyId, secretAccessKey);
    }
}
